<!-- 场次列表 -->

<script setup lang="ts">
import { ProTableScope, ProTableUltra } from '@/modules/package/table';
import { ElButton, ElSwitch } from 'element-plus';
import { useRoute } from 'vue-router';


const tableColumns = [
    { label: "序号", type: "index", width: "70" },
    { label: "场次名称", prop: "title", minWidth: "170" },
    { label: "有效时间", prop: "title", minWidth: "170" },
    { label: "显示排序", prop: "sort", width: "100" },
    { label: "场次状态", slot: "status", width: "120" },
    { label: "操作", slot: "operate", width: "120" },
];

const { params } = useRoute()

</script>

<template>

    <ProTableUltra :fetch-url="''" :columns="tableColumns">

        <ProTableScope>
            <template #status="{ row }">
                <ElSwitch :model-value="row.status"
                          active-text="开启"
                          inactive-text="禁用"
                          :active-value="0"
                          :inactive-value="1" />
            </template>

            <template #operate="{ row }">
                <ElButton link type="primary">编辑</ElButton>
                <ElButton link type="danger">删除</ElButton>
                <ElButton link type="success">票券</ElButton>
            </template>

        </ProTableScope>

    </ProTableUltra>


</template>